
{*****************************************************************************************}
{                                                                                         }
{                                    XML Data Binding                                     }
{                                                                                         }
{         Generated on: 2006-10-19 16:16:15                                               }
{       Generated from: G:\project\lw\QueryItValidator\Bin\queryIt.validator.config.xml   }
{                                                                                         }
{*****************************************************************************************}

unit XmlQueryItValidatorConfig;

interface

uses xmldom, XMLDoc, XMLIntf;

type

{ Forward Decls }

  IXMLQueryItValidatorType = interface;
  IXMLLoginMethodType = interface;
  IXMLRolesType = interface;
  IXMLRoleType = interface;
  IXMLReportType = interface;
  IXMLUsersType = interface;
  IXMLUserType = interface;

{ IXMLQueryItValidatorType }

  IXMLQueryItValidatorType = interface(IXMLNode)
    ['{DF33AA89-0305-41B8-AF94-14C9A341EB70}']
    { Property Accessors }
    function Get_Connection: WideString;
    function Get_LoginMethod: IXMLLoginMethodType;
    function Get_Roles: IXMLRolesType;
    function Get_Users: IXMLUsersType;
    procedure Set_Connection(Value: WideString);
    { Methods & Properties }
    property Connection: WideString read Get_Connection write Set_Connection;
    property LoginMethod: IXMLLoginMethodType read Get_LoginMethod;
    property Roles: IXMLRolesType read Get_Roles;
    property Users: IXMLUsersType read Get_Users;
  end;

{ IXMLLoginMethodType }

  IXMLLoginMethodType = interface(IXMLNode)
    ['{5FFFAC3E-298C-42E5-9DD4-5A95C044E302}']
    { Property Accessors }
    function Get_Permiss: WideString;
    procedure Set_Permiss(Value: WideString);
    { Methods & Properties }
    property Permiss: WideString read Get_Permiss write Set_Permiss;
  end;

{ IXMLRolesType }

  IXMLRolesType = interface(IXMLNodeCollection)
    ['{E0E3FB7F-BCCB-4E2D-B0B4-7A4F01898042}']
    { Property Accessors }
    function Get_Role(Index: Integer): IXMLRoleType;
    { Methods & Properties }
    function Add: IXMLRoleType;
    function Insert(const Index: Integer): IXMLRoleType;
    property Role[Index: Integer]: IXMLRoleType read Get_Role; default;
  end;

{ IXMLRoleType }

  IXMLRoleType = interface(IXMLNodeCollection)
    ['{99A2B243-7389-454A-B31A-356B7C336458}']
    { Property Accessors }
    function Get_Id: WideString;
    function Get_Name: WideString;
    function Get_Remark: WideString;
    function Get_Report(Index: Integer): IXMLReportType;
    procedure Set_Id(Value: WideString);
    procedure Set_Name(Value: WideString);
    procedure Set_Remark(Value: WideString);
    { Methods & Properties }
    function Add: IXMLReportType;
    function Insert(const Index: Integer): IXMLReportType;
    property Id: WideString read Get_Id write Set_Id;
    property Name: WideString read Get_Name write Set_Name;
    property Remark: WideString read Get_Remark write Set_Remark;
    property Report[Index: Integer]: IXMLReportType read Get_Report; default;
  end;

{ IXMLReportType }

  IXMLReportType = interface(IXMLNode)
    ['{B1206D6B-14E9-4962-8E46-073D790750D5}']
    { Property Accessors }
    function Get_Hash: WideString;
    procedure Set_Hash(Value: WideString);
    { Methods & Properties }
    property Hash: WideString read Get_Hash write Set_Hash;
  end;

{ IXMLUsersType }

  IXMLUsersType = interface(IXMLNodeCollection)
    ['{BBD6153C-248F-4B09-9711-CE2089113878}']
    { Property Accessors }
    function Get_User(Index: Integer): IXMLUserType;
    { Methods & Properties }
    function Add: IXMLUserType;
    function Insert(const Index: Integer): IXMLUserType;
    property User[Index: Integer]: IXMLUserType read Get_User; default;
  end;

{ IXMLUserType }

  IXMLUserType = interface(IXMLNode)
    ['{B0E494FB-465B-46E3-BEA7-105F23DF154A}']
    { Property Accessors }
    function Get_Login_id: WideString;
    function Get_Role_id_list: WideString;
    procedure Set_Login_id(Value: WideString);
    procedure Set_Role_id_list(Value: WideString);
    { Methods & Properties }
    property Login_id: WideString read Get_Login_id write Set_Login_id;
    property Role_id_list: WideString read Get_Role_id_list write Set_Role_id_list;
  end;

{ Forward Decls }

  TXMLQueryItValidatorType = class;
  TXMLLoginMethodType = class;
  TXMLRolesType = class;
  TXMLRoleType = class;
  TXMLReportType = class;
  TXMLUsersType = class;
  TXMLUserType = class;

{ TXMLQueryItValidatorType }

  TXMLQueryItValidatorType = class(TXMLNode, IXMLQueryItValidatorType)
  protected
    { IXMLQueryItValidatorType }
    function Get_Connection: WideString;
    function Get_LoginMethod: IXMLLoginMethodType;
    function Get_Roles: IXMLRolesType;
    function Get_Users: IXMLUsersType;
    procedure Set_Connection(Value: WideString);
  public
    procedure AfterConstruction; override;
  end;

{ TXMLLoginMethodType }

  TXMLLoginMethodType = class(TXMLNode, IXMLLoginMethodType)
  protected
    { IXMLLoginMethodType }
    function Get_Permiss: WideString;
    procedure Set_Permiss(Value: WideString);
  end;

{ TXMLRolesType }

  TXMLRolesType = class(TXMLNodeCollection, IXMLRolesType)
  protected
    { IXMLRolesType }
    function Get_Role(Index: Integer): IXMLRoleType;
    function Add: IXMLRoleType;
    function Insert(const Index: Integer): IXMLRoleType;
  public
    procedure AfterConstruction; override;
  end;

{ TXMLRoleType }

  TXMLRoleType = class(TXMLNodeCollection, IXMLRoleType)
  protected
    { IXMLRoleType }
    function Get_Id: WideString;
    function Get_Name: WideString;
    function Get_Remark: WideString;
    function Get_Report(Index: Integer): IXMLReportType;
    procedure Set_Id(Value: WideString);
    procedure Set_Name(Value: WideString);
    procedure Set_Remark(Value: WideString);
    function Add: IXMLReportType;
    function Insert(const Index: Integer): IXMLReportType;
  public
    procedure AfterConstruction; override;
  end;

{ TXMLReportType }

  TXMLReportType = class(TXMLNode, IXMLReportType)
  protected
    { IXMLReportType }
    function Get_Hash: WideString;
    procedure Set_Hash(Value: WideString);
  end;

{ TXMLUsersType }

  TXMLUsersType = class(TXMLNodeCollection, IXMLUsersType)
  protected
    { IXMLUsersType }
    function Get_User(Index: Integer): IXMLUserType;
    function Add: IXMLUserType;
    function Insert(const Index: Integer): IXMLUserType;
  public
    procedure AfterConstruction; override;
  end;

{ TXMLUserType }

  TXMLUserType = class(TXMLNode, IXMLUserType)
  protected
    { IXMLUserType }
    function Get_Login_id: WideString;
    function Get_Role_id_list: WideString;
    procedure Set_Login_id(Value: WideString);
    procedure Set_Role_id_list(Value: WideString);
  end;

{ Global Functions }

function GetqueryItValidator(Doc: IXMLDocument): IXMLQueryItValidatorType;
function LoadqueryItValidator(const FileName: WideString): IXMLQueryItValidatorType;
function NewqueryItValidator: IXMLQueryItValidatorType;

const
  TargetNamespace = '';

implementation

{ Global Functions }

function GetqueryItValidator(Doc: IXMLDocument): IXMLQueryItValidatorType;
begin
  Result := Doc.GetDocBinding('queryItValidator', TXMLQueryItValidatorType, TargetNamespace) as IXMLQueryItValidatorType;
end;

function LoadqueryItValidator(const FileName: WideString): IXMLQueryItValidatorType;
begin
  Result := LoadXMLDocument(FileName).GetDocBinding('queryItValidator', TXMLQueryItValidatorType, TargetNamespace) as IXMLQueryItValidatorType;
end;

function NewqueryItValidator: IXMLQueryItValidatorType;
begin
  Result := NewXMLDocument.GetDocBinding('queryItValidator', TXMLQueryItValidatorType, TargetNamespace) as IXMLQueryItValidatorType;
end;

{ TXMLQueryItValidatorType }

procedure TXMLQueryItValidatorType.AfterConstruction;
begin
  RegisterChildNode('loginMethod', TXMLLoginMethodType);
  RegisterChildNode('roles', TXMLRolesType);
  RegisterChildNode('users', TXMLUsersType);
  inherited;
end;

function TXMLQueryItValidatorType.Get_Connection: WideString;
begin
  Result := ChildNodes['connection'].Text;
end;

procedure TXMLQueryItValidatorType.Set_Connection(Value: WideString);
begin
  ChildNodes['connection'].NodeValue := Value;
end;

function TXMLQueryItValidatorType.Get_LoginMethod: IXMLLoginMethodType;
begin
  Result := ChildNodes['loginMethod'] as IXMLLoginMethodType;
end;

function TXMLQueryItValidatorType.Get_Roles: IXMLRolesType;
begin
  Result := ChildNodes['roles'] as IXMLRolesType;
end;

function TXMLQueryItValidatorType.Get_Users: IXMLUsersType;
begin
  Result := ChildNodes['users'] as IXMLUsersType;
end;

{ TXMLLoginMethodType }

function TXMLLoginMethodType.Get_Permiss: WideString;
begin
  Result := ChildNodes['permiss'].Text;
end;

procedure TXMLLoginMethodType.Set_Permiss(Value: WideString);
begin
  ChildNodes['permiss'].NodeValue := Value;
end;

{ TXMLRolesType }

procedure TXMLRolesType.AfterConstruction;
begin
  RegisterChildNode('role', TXMLRoleType);
  ItemTag := 'role';
  ItemInterface := IXMLRoleType;
  inherited;
end;

function TXMLRolesType.Get_Role(Index: Integer): IXMLRoleType;
begin
  Result := List[Index] as IXMLRoleType;
end;

function TXMLRolesType.Add: IXMLRoleType;
begin
  Result := AddItem(-1) as IXMLRoleType;
end;

function TXMLRolesType.Insert(const Index: Integer): IXMLRoleType;
begin
  Result := AddItem(Index) as IXMLRoleType;
end;

{ TXMLRoleType }

procedure TXMLRoleType.AfterConstruction;
begin
  RegisterChildNode('report', TXMLReportType);
  ItemTag := 'report';
  ItemInterface := IXMLReportType;
  inherited;
end;

function TXMLRoleType.Get_Id: WideString;
begin
  Result := AttributeNodes['id'].Text;
end;

procedure TXMLRoleType.Set_Id(Value: WideString);
begin
  SetAttribute('id', Value);
end;

function TXMLRoleType.Get_Name: WideString;
begin
  Result := AttributeNodes['name'].Text;
end;

procedure TXMLRoleType.Set_Name(Value: WideString);
begin
  SetAttribute('name', Value);
end;

function TXMLRoleType.Get_Remark: WideString;
begin
  Result := AttributeNodes['remark'].Text;
end;

procedure TXMLRoleType.Set_Remark(Value: WideString);
begin
  SetAttribute('remark', Value);
end;

function TXMLRoleType.Get_Report(Index: Integer): IXMLReportType;
begin
  Result := List[Index] as IXMLReportType;
end;

function TXMLRoleType.Add: IXMLReportType;
begin
  Result := AddItem(-1) as IXMLReportType;
end;

function TXMLRoleType.Insert(const Index: Integer): IXMLReportType;
begin
  Result := AddItem(Index) as IXMLReportType;
end;

{ TXMLReportType }

function TXMLReportType.Get_Hash: WideString;
begin
  Result := AttributeNodes['hash'].Text;
end;

procedure TXMLReportType.Set_Hash(Value: WideString);
begin
  SetAttribute('hash', Value);
end;

{ TXMLUsersType }

procedure TXMLUsersType.AfterConstruction;
begin
  RegisterChildNode('user', TXMLUserType);
  ItemTag := 'user';
  ItemInterface := IXMLUserType;
  inherited;
end;

function TXMLUsersType.Get_User(Index: Integer): IXMLUserType;
begin
  Result := List[Index] as IXMLUserType;
end;

function TXMLUsersType.Add: IXMLUserType;
begin
  Result := AddItem(-1) as IXMLUserType;
end;

function TXMLUsersType.Insert(const Index: Integer): IXMLUserType;
begin
  Result := AddItem(Index) as IXMLUserType;
end;

{ TXMLUserType }

function TXMLUserType.Get_Login_id: WideString;
begin
  Result := AttributeNodes['login_id'].Text;
end;

procedure TXMLUserType.Set_Login_id(Value: WideString);
begin
  SetAttribute('login_id', Value);
end;

function TXMLUserType.Get_Role_id_list: WideString;
begin
  Result := AttributeNodes['role_id_list'].Text;
end;

procedure TXMLUserType.Set_Role_id_list(Value: WideString);
begin
  SetAttribute('role_id_list', Value);
end;

end.